﻿using Common.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StatsData.Data.Entity
{
    public class t_wip_sn_test_statis_record : EntityBase
    {
        [EntityFieldIndex]
        public DateTime time { get; set; }

        /// <summary>
        /// 类型
        /// wip_work   正常
        /// wip_rework  返工
        /// 其他
        /// </summary>
        [EntityFieldLength(80)]
        public string statis_key { get; set; }

        [EntityFieldIndex]
        [EntityFieldLength(30)]
        public string work_code { get; set; }

        [EntityFieldLength(30)]
        public string ext_org_code { get; set; }

        [EntityFieldIndex]
        [EntityFieldLength(50)]
        public string product_code { get; set; }

        public string work_process_detail_id { get; set; }

        [EntityFieldLength(60)]
        public string procedure_name { get; set; }

        [EntityFieldIndex]
        [EntityFieldLength(60)]
        public string line_code { get; set; }

        public string workstage_id { get; set; }

        [EntityFieldLength(60)]
        public string workstage_name { get; set; }

        public string procedure_id { get; set; }

        /// <summary>
        /// 不良数
        /// </summary>
        public decimal bad_sn_qty { get; set; }

        /// <summary>
        /// NTF 数量
        /// </summary>
        public decimal ntf_sn_qty { get; set; }

        /// <summary>
        /// 良品数
        /// </summary>
        public decimal finish_sn_qty { get; set; }

        /// <summary>
        /// 测试一次OK产品数量
        /// </summary>
        public decimal first_sn_qty { get; set; }

        /// <summary>
        /// 测试一次OK测试次数
        /// </summary>
        public decimal first_test_qty { get; set; }

        /// <summary>
        /// 测试两次OK产品数量
        /// </summary>
        public decimal second_sn_qty { get; set; }

        /// <summary>
        /// 测试两次OK测试次数
        /// </summary>
        public decimal second_test_qty { get; set; }

        /// <summary>
        /// 测试三次OK产品数量
        /// </summary>
        public decimal three_sn_qty { get; set; }

        /// <summary>
        ///  测试三次OK测试次数
        /// </summary>
        public decimal three_test_qty { get; set; }

        /// <summary>
        /// 总产品数量
        /// </summary>
        public decimal total_sn_qty { get; set; }

        /// <summary>
        /// 总测试数
        /// </summary>
        public decimal total_test_qty { get; set; }

        /// <summary>
        /// 总ok数
        /// </summary>
        public decimal total_ok_test_qty { get; set; }


        /// <summary>
        ///  未经过维修(测试两次以上产品个数)
        /// </summary>
        public decimal retest_sn_qty { get; set; }

        /// <summary>
        ///  1个产品，未经过维修所有测试次数-1
        /// </summary>
        public decimal retest_test_qty { get; set; }

        /// <summary>
        /// 测试1次OK数量+测试2次第二次OK数量
        /// </summary>
        public decimal two_ok_sn_qty { get; set; }

        /// <summary>
        /// 测试记录
        /// 类型：数量 ,
        /// </summary>
        [EntityFieldLength(400)]
        public string test_record { get; set; }

        /// <summary>
        /// 良品总测试时长
        /// 单位S
        /// </summary>
        public decimal test_time { get; set; }

        /// <summary>
        /// 不良总测试时长 
        /// 单位S
        /// </summary>
        public decimal ng_test_time { get; set; }

        /// <summary>
        /// 测试时长记录
        /// 是否不良-类型:时长 秒
        /// </summary>
        [EntityFieldLength(400)]
        public string test_time_record { get; set; }
    }
}
